/*
 * Copyright (c) 2019. seven studio. @chengdu
 * seven studio in chengdu by lb
 * this project for snmp tool
 */

package com.xlx.openLink.conf;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeansException;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

@Component
@EnableAutoConfiguration
@Slf4j
public class ApplicationContextUtils implements ApplicationContextAware {

    public static ApplicationContext applicationContext = null;

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        this.applicationContext = applicationContext;
        log.info("设置ApplicationContext成功！");
    }
}
